package com.situ.ssh.service.impl;

import com.situ.ssh.common.ServerResponse;
import com.situ.ssh.dao.IUserDao;
import com.situ.ssh.entity.SearchCondition;
import com.situ.ssh.entity.User;
import com.situ.ssh.service.IUserService;
import org.hibernate.criterion.DetachedCriteria;
import org.hibernate.criterion.Projection;
import org.hibernate.criterion.Projections;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserServiceImpl implements IUserService {

    @Autowired
    private IUserDao userDao;

    public void save(User user) {

    }

    public void deleteById(User user) {

    }

    public void update(User user) {

    }

    public User findById(Integer id) {
        return null;
    }

    public List<User> findAll() {
        return userDao.findAll();
    }

    public User login(User user) {
        return userDao.login(user);
    }

    @Override
    public ServerResponse pageList(SearchCondition searchCondition) {
        return userDao.pageList(searchCondition);
    }


}
